package net.minecraft.src;

import java.util.Random;

public class mod_Exoskelet extends BaseMod
{

	

    public static Item Exoskelethelmet = (new ItemArmor(4000, 1, ModLoader.AddArmor("Exoskelet"), 0)).setItemName("Exoskelethelmet");
    public static Item Exoskeletbody = (new ItemArmor(4001, 1, ModLoader.AddArmor("Exoskelet"), 1)).setItemName("Exoskeletbody");
    public static Item Exoskeletlegs = (new ItemArmor(4002, 1, ModLoader.AddArmor("Exoskelet"), 2)).setItemName("Exoskeletlegs");
    public static Item Exoskeletboots = (new ItemArmor(4003, 1, ModLoader.AddArmor("Exoskelet"), 3)).setItemName("Exoskeletboots");
    public static Item Exoskeletscrap = (new Item(4004).setItemName("Exoscrap"));
    public static Item Dragonflyegg = (new Item(4005).setItemName("Dragonflyegg"));
    public static Item CDragonflyegg = (new ItemFood(4006, 5, true).setItemName("CDragonflyegg"));
    public static Item Dragonflywing = (new Item(4007).setItemName("Dragonflywing"));
    public static Item Scale = (new Item(4008).setItemName("Scale"));
    public static Item Scalehelmet = (new ItemArmor(4009, 2, ModLoader.AddArmor("Scale"), 0)).setItemName("ScaleScalehelmet");
    public static Item Scalebody = (new ItemArmor(4010, 2, ModLoader.AddArmor("Scale"), 1)).setItemName("ScaleScalebody");
    public static Item Scalelegs = (new ItemArmor(4011, 2, ModLoader.AddArmor("Scale"), 2)).setItemName("ScaleScalelegs");
    public static Item Scaleboots = (new ItemArmor(4012, 2, ModLoader.AddArmor("Scale"), 3)).setItemName("ScaleScaleboots");
    public static Block Boomblaadje = (new BlockBoomblaadje(200, 53)).setHardness(0.2F).setLightOpacity(1).setStepSound(Block.soundGrassFootstep).setBlockName("Boomblaadje").setRequiresSelfNotify(); 
    public static Block Stam = (new BlockStam(201,74)).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("stam");
    public static Block LuminousWool = (new BlockLuminousWool(202,64)).setHardness(2.0F).setStepSound(Block.soundClothFootstep).setLightValue(5F).setBlockName("LuminousWool");
    public static Block Gloop = (new BlockGloop(203,64)).setHardness(2.0F).setStepSound(Block.soundGravelFootstep).setBlockName("Gloop");
    public static Item Mould = (new Item(4013).setItemName("Mould"));
    public static Block Grinder = (new BlockGrinder(204).setHardness(2.0F).setStepSound(Block.soundWoodFootstep).setBlockName("Grinder"));


    public static Achievement youmurderer = new Achievement(3450, "youmurderer", 10, 2, mod_Exoskelet.CDragonflyegg, null).registerAchievement();
    

    
    
    public mod_Exoskelet()
    {
        ModLoader.AddName(Exoskelethelmet, "Exo-skeletal helmet");
        ModLoader.AddName(Exoskeletbody, "Exo-skeletal chestplate");
        ModLoader.AddName(Exoskeletlegs, "Exo-skeletalal legs");
        ModLoader.AddName(Exoskeletboots, "Exo-skeletalal boots");
        ModLoader.AddName(Exoskeletscrap, "Exo-skeletal scrap");
        ModLoader.AddName(Dragonflyegg, "Dragonfly Eggs");
        ModLoader.AddName(CDragonflyegg, "Cooked Dragonfly Eggs");
        ModLoader.AddName(Dragonflywing, "Dragonfly Wing");
        ModLoader.AddName(Boomblaadje, "Boomblaadje");
        ModLoader.AddName(Stam, "Stam");
        ModLoader.AddName(Scale, "Scale");
        ModLoader.AddName(Scalehelmet, "Scale helmet");
        ModLoader.AddName(Scalebody, "Scale chestplate");
        ModLoader.AddName(Scalelegs, "Scale legs");
        ModLoader.AddName(Scaleboots, "Scale boots");
        ModLoader.AddName(LuminousWool, "Luminous Wool");
        ModLoader.AddName(Gloop,  "Gloop");
        ModLoader.AddName(Mould,  "Empty Mould");
        ModLoader.AddName(Grinder,  "Grinder");



        ModLoader.AddAchievementDesc(youmurderer, "You murderer!", "Cook some Dragonfly eggs");


        ModLoader.AddRecipe(new ItemStack(Exoskelethelmet, 1), new Object[] {
            "XXX", "X X", Character.valueOf('X'), mod_Exoskelet.Exoskeletscrap
            });
        ModLoader.AddRecipe(new ItemStack(Exoskeletbody, 1), new Object[] {
            "X X", "XXX", "XXX", Character.valueOf('X'), mod_Exoskelet.Exoskeletscrap
        });
        ModLoader.AddRecipe(new ItemStack(Exoskeletlegs, 1), new Object[] {
            "XXX", "X X","X X", Character.valueOf('X'), mod_Exoskelet.Exoskeletscrap
        });
        ModLoader.AddRecipe(new ItemStack(Exoskeletboots, 1), new Object[] {
            "X X", "X X", Character.valueOf('X'), mod_Exoskelet.Exoskeletscrap
        });
        ModLoader.AddRecipe(new ItemStack(Exoskeletscrap, 1), new Object[] {
            "X", Character.valueOf('X'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Dragonflyegg, 1), new Object[] {
            "XX", Character.valueOf('X'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Boomblaadje, 1), new Object[] {
            "XXX", Character.valueOf('X'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Boomblaadje, 1), new Object[] {
            "X X", Character.valueOf('X'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Scale, 1), new Object[] {
            "X", "X", Character.valueOf('X'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Scalehelmet, 1), new Object[] {
            "XXX", "X X", Character.valueOf('X'), mod_Exoskelet.Scale
            });
        ModLoader.AddRecipe(new ItemStack(Scalebody, 1), new Object[] {
            "X X", "XXX", "XXX", Character.valueOf('X'), mod_Exoskelet.Scale
        });
        ModLoader.AddRecipe(new ItemStack(Scalelegs, 1), new Object[] {
            "XXX", "X X","X X", Character.valueOf('X'), mod_Exoskelet.Scale
        });
        ModLoader.AddRecipe(new ItemStack(Scaleboots, 1), new Object[] {
            "X X", "X X", Character.valueOf('X'), mod_Exoskelet.Scale
        });
        ModLoader.AddRecipe(new ItemStack(LuminousWool, 1), new Object[] {
            "XX", Character.valueOf('X'), Block.cloth
        });
        ModLoader.AddRecipe(new ItemStack(Gloop, 1), new Object[] {
            "XD", Character.valueOf('X'), Block.stone, Character.valueOf('D'), Block.dirt
        });
        ModLoader.AddRecipe(new ItemStack(Mould, 1), new Object[] {
            "X X", " X ", Character.valueOf('X'), Block.stone
        });

        
        ModLoader.AddSmelting(mod_Exoskelet.Dragonflyegg.shiftedIndex, new ItemStack(mod_Exoskelet.CDragonflyegg));                   
      
        Exoskelethelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ExoH.png");
        Exoskeletbody.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ExoBY.png");
        Exoskeletlegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ExoL.png");
        Exoskeletboots.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ExoBO.png");
        Exoskeletscrap.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ExoScrap.png");
        Dragonflyegg.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/DFeggs.png");
        CDragonflyegg.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/CDFeggs.png");
        Dragonflywing.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/DFwing.png");
        Boomblaadje.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/PPH/Boomblaadje.png");
       // Stam.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/PPH/Stam.png");
        Scale.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/Scale.png");
        Scalehelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ScaleH.png");
        Scalebody.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ScaleBY.png");
        Scalelegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ScaleL.png");
        Scaleboots.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/ScaleBO.png");
        Gloop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/PPH/Gloop.png");
        Mould.iconIndex = ModLoader.addOverride("/gui/items.png", "/PPH/Mould.png");

        
        ModLoader.RegisterBlock(Boomblaadje);
        ModLoader.RegisterBlock(Stam);
        ModLoader.RegisterBlock(LuminousWool);
        ModLoader.RegisterBlock(Gloop);
        ModLoader.RegisterBlock(Grinder);
        
        ModLoader.RegisterTileEntity(TileEntityGrinder, "Grinder");




    }
    public void TakenFromFurnace(EntityPlayer entityplayer, ItemStack itemstack)
    {
            if(itemstack.itemID == mod_Exoskelet.CDragonflyegg.shiftedIndex)
            {
                    entityplayer.addStat(youmurderer, 1);
            }

    }
    public void GenerateSurface(World world, Random random, int i, int j) 
    { 
        BiomeGenBase biomegenbase = world.getWorldChunkManager().getBiomeGenAt(i, j); 
        WorldGenExo mytrees = new WorldGenExo(); 
        if((biomegenbase instanceof BiomeGenSwamp) || (biomegenbase instanceof BiomeGenForest) || (biomegenbase instanceof BiomeGenHills)) 
        { 
            int k = i + random.nextInt(16) + 8; 
            int l = j + random.nextInt(16) + 8; 
            int i1 = world.getHeightValue(k, l); 
            mytrees.func_517_a(1.0D, 1.0D, 1.0D); 
            mytrees.generate(world, random, k, i1, l); 
        } 
    } 
    
       

    public String Version()
    {
        return "lawl";
    }

    
    }